<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8">
    
    <title>Constants of the numpy.ma module &mdash; NumPy v1.18 Manual</title>
    
    <link rel="stylesheet" type="text/css" href="../_static/css/spc-bootstrap.css">
    <link rel="stylesheet" type="text/css" href="../_static/css/spc-extend.css">
    <link rel="stylesheet" href="../_static/scipy.css" type="text/css" >
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" >
    <link rel="stylesheet" href="../_static/graphviz.css" type="text/css" >
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.18.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  false
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    <script type="text/javascript" src="../_static/js/copybutton.js"></script>
    <link rel="author" title="About these documents" href="../about.html" >
    <link rel="index" title="Index" href="../genindex.html" >
    <link rel="search" title="Search" href="../search.html" >
    <link rel="top" title="NumPy v1.18 Manual" href="../index.html" >
    <link rel="up" title="Masked arrays" href="maskedarray.html" >
    <link rel="next" title="numpy.ma.MaskedArray.base" href="generated/numpy.ma.MaskedArray.base.html" >
    <link rel="prev" title="numpy.ma.masked_where" href="generated/numpy.ma.masked_where.html" > 
  </head>
  <body>
<div class="container">
  <div class="top-scipy-org-logo-header" style="background-color: #a2bae8;">
    <a href="../index.html">
      <img border=0 alt="NumPy" src="../_static/numpy_logo.png"></a>
    </div>
  </div>
</div>


    <div class="container">
      <div class="main">
        
	<div class="row-fluid">
	  <div class="span12">
	    <div class="spc-navbar">
              
    <ul class="nav nav-pills pull-left">
        <li class="active"><a href="https://numpy.org/">NumPy.org</a></li>
        <li class="active"><a href="https://numpy.org/doc">Docs</a></li>
        
        <li class="active"><a href="../index.html">NumPy v1.18 Manual</a></li>
        

          <li class="active"><a href="index.html" >NumPy Reference</a></li>
          <li class="active"><a href="arrays.html" >Array objects</a></li>
          <li class="active"><a href="maskedarray.html" accesskey="U">Masked arrays</a></li> 
    </ul>
              
              
    <ul class="nav nav-pills pull-right">
      <li class="active">
        <a href="../genindex.html" title="General Index"
           accesskey="I">index</a>
      </li>
      <li class="active">
        <a href="generated/numpy.ma.MaskedArray.base.html" title="numpy.ma.MaskedArray.base"
           accesskey="N">next</a>
      </li>
      <li class="active">
        <a href="generated/numpy.ma.masked_where.html" title="numpy.ma.masked_where"
           accesskey="P">previous</a>
      </li>
    </ul>
              
	    </div>
	  </div>
	</div>
        

	<div class="row-fluid">
      <div class="spc-rightsidebar span3">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../contents.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Constants of the <code class="xref py py-mod docutils literal notranslate"><span class="pre">numpy.ma</span></code> module</a></li>
<li><a class="reference internal" href="#the-maskedarray-class">The <code class="xref py py-class docutils literal notranslate"><span class="pre">MaskedArray</span></code> class</a><ul>
<li><a class="reference internal" href="#attributes-and-properties-of-masked-arrays">Attributes and properties of masked arrays</a></li>
</ul>
</li>
<li><a class="reference internal" href="#maskedarray-methods"><code class="xref py py-class docutils literal notranslate"><span class="pre">MaskedArray</span></code> methods</a><ul>
<li><a class="reference internal" href="#conversion">Conversion</a></li>
<li><a class="reference internal" href="#shape-manipulation">Shape manipulation</a></li>
<li><a class="reference internal" href="#item-selection-and-manipulation">Item selection and manipulation</a></li>
<li><a class="reference internal" href="#pickling-and-copy">Pickling and copy</a></li>
<li><a class="reference internal" href="#calculations">Calculations</a></li>
<li><a class="reference internal" href="#arithmetic-and-comparison-operations">Arithmetic and comparison operations</a><ul>
<li><a class="reference internal" href="#comparison-operators">Comparison operators:</a></li>
<li><a class="reference internal" href="#truth-value-of-an-array-bool">Truth value of an array (<code class="xref py py-func docutils literal notranslate"><span class="pre">bool</span></code>):</a></li>
<li><a class="reference internal" href="#arithmetic">Arithmetic:</a></li>
<li><a class="reference internal" href="#arithmetic-in-place">Arithmetic, in-place:</a></li>
</ul>
</li>
<li><a class="reference internal" href="#representation">Representation</a></li>
<li><a class="reference internal" href="#special-methods">Special methods</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#specific-methods">Specific methods</a><ul>
<li><a class="reference internal" href="#handling-the-mask">Handling the mask</a></li>
<li><a class="reference internal" href="#handling-the-fill-value">Handling the <em class="xref py py-obj">fill_value</em></a></li>
<li><a class="reference internal" href="#counting-the-missing-elements">Counting the missing elements</a></li>
</ul>
</li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="generated/numpy.ma.masked_where.html"
                        title="previous chapter">numpy.ma.masked_where</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="generated/numpy.ma.MaskedArray.base.html"
                        title="next chapter">numpy.ma.MaskedArray.base</a></p>
<div id="searchbox" style="display: none" role="search">
  <h4>Quick search</h4>
    <div>
    <form class="search" action="../search.html" method="get">
      <input type="text" style="width: inherit;" name="q" />
      <input type="submit" value="search" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
          <div class="span9">
            
        <div class="bodywrapper">
          <div class="body" id="spc-section-body">
            
  <div class="section" id="constants-of-the-numpy-ma-module">
<span id="numpy-ma-constants"></span><h1>Constants of the <a class="reference internal" href="maskedarray.generic.html#module-numpy.ma" title="numpy.ma"><code class="xref py py-mod docutils literal notranslate"><span class="pre">numpy.ma</span></code></a> module<a class="headerlink" href="#constants-of-the-numpy-ma-module" title="Permalink to this headline">¶</a></h1>
<p>In addition to the <a class="reference internal" href="#numpy.ma.MaskedArray" title="numpy.ma.MaskedArray"><code class="xref py py-class docutils literal notranslate"><span class="pre">MaskedArray</span></code></a> class, the <a class="reference internal" href="maskedarray.generic.html#module-numpy.ma" title="numpy.ma"><code class="xref py py-mod docutils literal notranslate"><span class="pre">numpy.ma</span></code></a> module
defines several constants.</p>
<dl class="data">
<dt id="numpy.ma.masked">
<code class="sig-prename descclassname">numpy.ma.</code><code class="sig-name descname">masked</code><a class="headerlink" href="#numpy.ma.masked" title="Permalink to this definition">¶</a></dt>
<dd><p>The <a class="reference internal" href="#numpy.ma.masked" title="numpy.ma.masked"><code class="xref py py-attr docutils literal notranslate"><span class="pre">masked</span></code></a> constant is a special case of <a class="reference internal" href="#numpy.ma.MaskedArray" title="numpy.ma.MaskedArray"><code class="xref py py-class docutils literal notranslate"><span class="pre">MaskedArray</span></code></a>,
with a float datatype and a null shape. It is used to test whether a
specific entry of a masked array is masked, or to mask one or several
entries of a masked array:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">x</span> <span class="o">=</span> <span class="n">ma</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">],</span> <span class="n">mask</span><span class="o">=</span><span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">x</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="ow">is</span> <span class="n">ma</span><span class="o">.</span><span class="n">masked</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">x</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="n">ma</span><span class="o">.</span><span class="n">masked</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">x</span>
<span class="go">masked_array(data = [1 -- --],</span>
<span class="go">             mask = [False  True  True],</span>
<span class="go">       fill_value = 999999)</span>
</pre></div>
</div>
</dd></dl>

<dl class="data">
<dt id="numpy.ma.nomask">
<code class="sig-prename descclassname">numpy.ma.</code><code class="sig-name descname">nomask</code><a class="headerlink" href="#numpy.ma.nomask" title="Permalink to this definition">¶</a></dt>
<dd><p>Value indicating that a masked array has no invalid entry.
<a class="reference internal" href="#numpy.ma.nomask" title="numpy.ma.nomask"><code class="xref py py-attr docutils literal notranslate"><span class="pre">nomask</span></code></a> is used internally to speed up computations when the mask
is not needed.</p>
</dd></dl>

<dl class="data">
<dt id="numpy.ma.masked_print_options">
<code class="sig-prename descclassname">numpy.ma.</code><code class="sig-name descname">masked_print_options</code><a class="headerlink" href="#numpy.ma.masked_print_options" title="Permalink to this definition">¶</a></dt>
<dd><p>String used in lieu of missing data when a masked array is printed.
By default, this string is <code class="docutils literal notranslate"><span class="pre">'--'</span></code>.</p>
</dd></dl>

</div>
<div class="section" id="the-maskedarray-class">
<span id="maskedarray-baseclass"></span><h1>The <a class="reference internal" href="#numpy.ma.MaskedArray" title="numpy.ma.MaskedArray"><code class="xref py py-class docutils literal notranslate"><span class="pre">MaskedArray</span></code></a> class<a class="headerlink" href="#the-maskedarray-class" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="numpy.ma.MaskedArray">
<em class="property">class </em><code class="sig-prename descclassname">numpy.ma.</code><code class="sig-name descname">MaskedArray</code><a class="reference external" href="https://github.com/numpy/numpy/blob/v1.18.1/numpy/ma/core.py#L2717-L6139"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#numpy.ma.MaskedArray" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<p>A subclass of <a class="reference internal" href="generated/numpy.ndarray.html#numpy.ndarray" title="numpy.ndarray"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a> designed to manipulate numerical arrays with missing data.</p>
<p>An instance of <a class="reference internal" href="#numpy.ma.MaskedArray" title="numpy.ma.MaskedArray"><code class="xref py py-class docutils literal notranslate"><span class="pre">MaskedArray</span></code></a> can be thought as the combination of several elements:</p>
<ul class="simple">
<li><p>The <a class="reference internal" href="#numpy.ma.MaskedArray.data" title="numpy.ma.MaskedArray.data"><code class="xref py py-attr docutils literal notranslate"><span class="pre">data</span></code></a>, as a regular <a class="reference internal" href="generated/numpy.ndarray.html#numpy.ndarray" title="numpy.ndarray"><code class="xref py py-class docutils literal notranslate"><span class="pre">numpy.ndarray</span></code></a> of any shape or datatype (the data).</p></li>
<li><p>A boolean <a class="reference internal" href="#numpy.ma.MaskedArray.mask" title="numpy.ma.MaskedArray.mask"><code class="xref py py-attr docutils literal notranslate"><span class="pre">mask</span></code></a> with the same shape as the data, where a <code class="docutils literal notranslate"><span class="pre">True</span></code> value indicates that the corresponding element of the data is invalid.
The special value <a class="reference internal" href="#numpy.ma.nomask" title="numpy.ma.nomask"><code class="xref py py-const docutils literal notranslate"><span class="pre">nomask</span></code></a> is also acceptable for arrays without named fields, and indicates that no data is invalid.</p></li>
<li><p>A <a class="reference internal" href="#numpy.ma.MaskedArray.fill_value" title="numpy.ma.MaskedArray.fill_value"><code class="xref py py-attr docutils literal notranslate"><span class="pre">fill_value</span></code></a>, a value that may be used to replace the invalid entries in order to return a standard <a class="reference internal" href="generated/numpy.ndarray.html#numpy.ndarray" title="numpy.ndarray"><code class="xref py py-class docutils literal notranslate"><span class="pre">numpy.ndarray</span></code></a>.</p></li>
</ul>
<div class="section" id="attributes-and-properties-of-masked-arrays">
<span id="ma-attributes"></span><h2>Attributes and properties of masked arrays<a class="headerlink" href="#attributes-and-properties-of-masked-arrays" title="Permalink to this headline">¶</a></h2>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="arrays.ndarray.html#arrays-ndarray-attributes"><span class="std std-ref">Array Attributes</span></a></p>
</div>
<dl class="attribute">
<dt id="numpy.ma.MaskedArray.data">
<code class="sig-prename descclassname">MaskedArray.</code><code class="sig-name descname">data</code><a class="headerlink" href="#numpy.ma.MaskedArray.data" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the underlying data, as a view of the masked array.</p>
<p>If the underlying data is a subclass of <a class="reference internal" href="generated/numpy.ndarray.html#numpy.ndarray" title="numpy.ndarray"><code class="xref py py-class docutils literal notranslate"><span class="pre">numpy.ndarray</span></code></a>, it is
returned as such.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">x</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">ma</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">matrix</span><span class="p">([[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">],</span> <span class="p">[</span><span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">]]),</span> <span class="n">mask</span><span class="o">=</span><span class="p">[[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">]])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">x</span><span class="o">.</span><span class="n">data</span>
<span class="go">matrix([[1, 2],</span>
<span class="go">        [3, 4]])</span>
</pre></div>
</div>
<p>The type of the data can be accessed through the <a class="reference internal" href="#numpy.ma.MaskedArray.baseclass" title="numpy.ma.MaskedArray.baseclass"><code class="xref py py-attr docutils literal notranslate"><span class="pre">baseclass</span></code></a>
attribute.</p>
</dd></dl>

<dl class="attribute">
<dt id="numpy.ma.MaskedArray.mask">
<code class="sig-prename descclassname">MaskedArray.</code><code class="sig-name descname">mask</code><a class="headerlink" href="#numpy.ma.MaskedArray.mask" title="Permalink to this definition">¶</a></dt>
<dd><p>Current mask.</p>
</dd></dl>

<dl class="attribute">
<dt id="numpy.ma.MaskedArray.recordmask">
<code class="sig-prename descclassname">MaskedArray.</code><code class="sig-name descname">recordmask</code><a class="headerlink" href="#numpy.ma.MaskedArray.recordmask" title="Permalink to this definition">¶</a></dt>
<dd><p>Get or set the mask of the array if it has no named fields. For
structured arrays, returns a ndarray of booleans where entries are
<code class="docutils literal notranslate"><span class="pre">True</span></code> if <strong>all</strong> the fields are masked, <code class="docutils literal notranslate"><span class="pre">False</span></code> otherwise:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">x</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">ma</span><span class="o">.</span><span class="n">array</span><span class="p">([(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span class="p">),</span> <span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">3</span><span class="p">),</span> <span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="mi">4</span><span class="p">),</span> <span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="mi">5</span><span class="p">)],</span>
<span class="gp">... </span>        <span class="n">mask</span><span class="o">=</span><span class="p">[(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)],</span>
<span class="gp">... </span>       <span class="n">dtype</span><span class="o">=</span><span class="p">[(</span><span class="s1">&#39;a&#39;</span><span class="p">,</span> <span class="nb">int</span><span class="p">),</span> <span class="p">(</span><span class="s1">&#39;b&#39;</span><span class="p">,</span> <span class="nb">int</span><span class="p">)])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">x</span><span class="o">.</span><span class="n">recordmask</span>
<span class="go">array([False, False,  True, False, False])</span>
</pre></div>
</div>
</dd></dl>

<dl class="attribute">
<dt id="numpy.ma.MaskedArray.fill_value">
<code class="sig-prename descclassname">MaskedArray.</code><code class="sig-name descname">fill_value</code><a class="headerlink" href="#numpy.ma.MaskedArray.fill_value" title="Permalink to this definition">¶</a></dt>
<dd><p>The filling value of the masked array is a scalar. When setting, None
will set to a default based on the data type.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">dt</span> <span class="ow">in</span> <span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">int32</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">int64</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">float64</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">complex128</span><span class="p">]:</span>
<span class="gp">... </span>    <span class="n">np</span><span class="o">.</span><span class="n">ma</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span> <span class="n">dtype</span><span class="o">=</span><span class="n">dt</span><span class="p">)</span><span class="o">.</span><span class="n">get_fill_value</span><span class="p">()</span>
<span class="gp">...</span>
<span class="go">999999</span>
<span class="go">999999</span>
<span class="go">1e+20</span>
<span class="go">(1e+20+0j)</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">x</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">ma</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">0</span><span class="p">,</span> <span class="mf">1.</span><span class="p">],</span> <span class="n">fill_value</span><span class="o">=-</span><span class="n">np</span><span class="o">.</span><span class="n">inf</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">x</span><span class="o">.</span><span class="n">fill_value</span>
<span class="go">-inf</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">x</span><span class="o">.</span><span class="n">fill_value</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">pi</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">x</span><span class="o">.</span><span class="n">fill_value</span>
<span class="go">3.1415926535897931 # may vary</span>
</pre></div>
</div>
<p>Reset to default:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">x</span><span class="o">.</span><span class="n">fill_value</span> <span class="o">=</span> <span class="kc">None</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">x</span><span class="o">.</span><span class="n">fill_value</span>
<span class="go">1e+20</span>
</pre></div>
</div>
</dd></dl>

<dl class="attribute">
<dt id="numpy.ma.MaskedArray.baseclass">
<code class="sig-prename descclassname">MaskedArray.</code><code class="sig-name descname">baseclass</code><a class="headerlink" href="#numpy.ma.MaskedArray.baseclass" title="Permalink to this definition">¶</a></dt>
<dd><p>Class of the underlying data (read-only).</p>
</dd></dl>

<dl class="attribute">
<dt id="numpy.ma.MaskedArray.sharedmask">
<code class="sig-prename descclassname">MaskedArray.</code><code class="sig-name descname">sharedmask</code><a class="headerlink" href="#numpy.ma.MaskedArray.sharedmask" title="Permalink to this definition">¶</a></dt>
<dd><p>Share status of the mask (read-only).</p>
</dd></dl>

<dl class="attribute">
<dt id="numpy.ma.MaskedArray.hardmask">
<code class="sig-prename descclassname">MaskedArray.</code><code class="sig-name descname">hardmask</code><a class="headerlink" href="#numpy.ma.MaskedArray.hardmask" title="Permalink to this definition">¶</a></dt>
<dd><p>Hardness of the mask</p>
</dd></dl>

<p>As <a class="reference internal" href="#numpy.ma.MaskedArray" title="numpy.ma.MaskedArray"><code class="xref py py-class docutils literal notranslate"><span class="pre">MaskedArray</span></code></a> is a subclass of <a class="reference internal" href="generated/numpy.ndarray.html#numpy.ndarray" title="numpy.ndarray"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a>, a masked array also inherits all the attributes and properties of a  <a class="reference internal" href="generated/numpy.ndarray.html#numpy.ndarray" title="numpy.ndarray"><code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code></a> instance.</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.base.html#numpy.ma.MaskedArray.base" title="numpy.ma.MaskedArray.base"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.base</span></code></a></p></td>
<td><p>Base object if memory is from some other object.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.ctypes.html#numpy.ma.MaskedArray.ctypes" title="numpy.ma.MaskedArray.ctypes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.ctypes</span></code></a></p></td>
<td><p>An object to simplify the interaction of the array with the ctypes module.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.dtype.html#numpy.ma.MaskedArray.dtype" title="numpy.ma.MaskedArray.dtype"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.dtype</span></code></a></p></td>
<td><p>Data-type of the array’s elements.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.flags.html#numpy.ma.MaskedArray.flags" title="numpy.ma.MaskedArray.flags"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.flags</span></code></a></p></td>
<td><p>Information about the memory layout of the array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.itemsize.html#numpy.ma.MaskedArray.itemsize" title="numpy.ma.MaskedArray.itemsize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.itemsize</span></code></a></p></td>
<td><p>Length of one array element in bytes.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.nbytes.html#numpy.ma.MaskedArray.nbytes" title="numpy.ma.MaskedArray.nbytes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.nbytes</span></code></a></p></td>
<td><p>Total bytes consumed by the elements of the array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.ndim.html#numpy.ma.MaskedArray.ndim" title="numpy.ma.MaskedArray.ndim"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.ndim</span></code></a></p></td>
<td><p>Number of array dimensions.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.shape.html#numpy.ma.MaskedArray.shape" title="numpy.ma.MaskedArray.shape"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.shape</span></code></a></p></td>
<td><p>Tuple of array dimensions.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.size.html#numpy.ma.MaskedArray.size" title="numpy.ma.MaskedArray.size"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.size</span></code></a></p></td>
<td><p>Number of elements in the array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.strides.html#numpy.ma.MaskedArray.strides" title="numpy.ma.MaskedArray.strides"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.strides</span></code></a></p></td>
<td><p>Tuple of bytes to step in each dimension when traversing an array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.imag.html#numpy.ma.MaskedArray.imag" title="numpy.ma.MaskedArray.imag"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.imag</span></code></a></p></td>
<td><p>The imaginary part of the masked array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.real.html#numpy.ma.MaskedArray.real" title="numpy.ma.MaskedArray.real"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.real</span></code></a></p></td>
<td><p>The real part of the masked array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.flat.html#numpy.ma.MaskedArray.flat" title="numpy.ma.MaskedArray.flat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.flat</span></code></a></p></td>
<td><p>Return a flat iterator, or set a flattened version of self to value.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__array_priority__.html#numpy.ma.MaskedArray.__array_priority__" title="numpy.ma.MaskedArray.__array_priority__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__array_priority__</span></code></a></p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="maskedarray-methods">
<h1><a class="reference internal" href="#numpy.ma.MaskedArray" title="numpy.ma.MaskedArray"><code class="xref py py-class docutils literal notranslate"><span class="pre">MaskedArray</span></code></a> methods<a class="headerlink" href="#maskedarray-methods" title="Permalink to this headline">¶</a></h1>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="arrays.ndarray.html#array-ndarray-methods"><span class="std std-ref">Array methods</span></a></p>
</div>
<div class="section" id="conversion">
<h2>Conversion<a class="headerlink" href="#conversion" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__float__.html#numpy.ma.MaskedArray.__float__" title="numpy.ma.MaskedArray.__float__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__float__</span></code></a>(self)</p></td>
<td><p>Convert to float.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__int__.html#numpy.ma.MaskedArray.__int__" title="numpy.ma.MaskedArray.__int__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__int__</span></code></a>(self)</p></td>
<td><p>Convert to int.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__long__.html#numpy.ma.MaskedArray.__long__" title="numpy.ma.MaskedArray.__long__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__long__</span></code></a>(self)</p></td>
<td><p>Convert to long.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.view.html#numpy.ma.MaskedArray.view" title="numpy.ma.MaskedArray.view"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.view</span></code></a>(self[, dtype, type, fill_value])</p></td>
<td><p>Return a view of the MaskedArray data.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.astype.html#numpy.ma.MaskedArray.astype" title="numpy.ma.MaskedArray.astype"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.astype</span></code></a>(dtype[, order, casting, …])</p></td>
<td><p>Copy of the array, cast to a specified type.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.byteswap.html#numpy.ma.MaskedArray.byteswap" title="numpy.ma.MaskedArray.byteswap"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.byteswap</span></code></a>([inplace])</p></td>
<td><p>Swap the bytes of the array elements</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.compressed.html#numpy.ma.MaskedArray.compressed" title="numpy.ma.MaskedArray.compressed"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.compressed</span></code></a>(self)</p></td>
<td><p>Return all the non-masked data as a 1-D array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.filled.html#numpy.ma.MaskedArray.filled" title="numpy.ma.MaskedArray.filled"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.filled</span></code></a>(self[, fill_value])</p></td>
<td><p>Return a copy of self, with masked values filled with a given value.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.tofile.html#numpy.ma.MaskedArray.tofile" title="numpy.ma.MaskedArray.tofile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.tofile</span></code></a>(self, fid[, sep, format])</p></td>
<td><p>Save a masked array to a file in binary format.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.toflex.html#numpy.ma.MaskedArray.toflex" title="numpy.ma.MaskedArray.toflex"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.toflex</span></code></a>(self)</p></td>
<td><p>Transforms a masked array into a flexible-type array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.tolist.html#numpy.ma.MaskedArray.tolist" title="numpy.ma.MaskedArray.tolist"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.tolist</span></code></a>(self[, fill_value])</p></td>
<td><p>Return the data portion of the masked array as a hierarchical Python list.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.torecords.html#numpy.ma.MaskedArray.torecords" title="numpy.ma.MaskedArray.torecords"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.torecords</span></code></a>(self)</p></td>
<td><p>Transforms a masked array into a flexible-type array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.tostring.html#numpy.ma.MaskedArray.tostring" title="numpy.ma.MaskedArray.tostring"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.tostring</span></code></a>(self[, fill_value, order])</p></td>
<td><p>This function is a compatibility alias for tobytes.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.tobytes.html#numpy.ma.MaskedArray.tobytes" title="numpy.ma.MaskedArray.tobytes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.tobytes</span></code></a>(self[, fill_value, order])</p></td>
<td><p>Return the array data as a string containing the raw bytes in the array.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="shape-manipulation">
<h2>Shape manipulation<a class="headerlink" href="#shape-manipulation" title="Permalink to this headline">¶</a></h2>
<p>For reshape, resize, and transpose, the single tuple argument may be
replaced with <code class="docutils literal notranslate"><span class="pre">n</span></code> integers which will be interpreted as an n-tuple.</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.flatten.html#numpy.ma.MaskedArray.flatten" title="numpy.ma.MaskedArray.flatten"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.flatten</span></code></a>([order])</p></td>
<td><p>Return a copy of the array collapsed into one dimension.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.ravel.html#numpy.ma.MaskedArray.ravel" title="numpy.ma.MaskedArray.ravel"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.ravel</span></code></a>(self[, order])</p></td>
<td><p>Returns a 1D version of self, as a view.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.reshape.html#numpy.ma.MaskedArray.reshape" title="numpy.ma.MaskedArray.reshape"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.reshape</span></code></a>(self, \*s, \*\*kwargs)</p></td>
<td><p>Give a new shape to the array without changing its data.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.resize.html#numpy.ma.MaskedArray.resize" title="numpy.ma.MaskedArray.resize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.resize</span></code></a>(self, newshape[, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.squeeze.html#numpy.ma.MaskedArray.squeeze" title="numpy.ma.MaskedArray.squeeze"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.squeeze</span></code></a>([axis])</p></td>
<td><p>Remove single-dimensional entries from the shape of <em class="xref py py-obj">a</em>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.swapaxes.html#numpy.ma.MaskedArray.swapaxes" title="numpy.ma.MaskedArray.swapaxes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.swapaxes</span></code></a>(axis1, axis2)</p></td>
<td><p>Return a view of the array with <em class="xref py py-obj">axis1</em> and <em class="xref py py-obj">axis2</em> interchanged.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.transpose.html#numpy.ma.MaskedArray.transpose" title="numpy.ma.MaskedArray.transpose"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.transpose</span></code></a>(*axes)</p></td>
<td><p>Returns a view of the array with axes transposed.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.T.html#numpy.ma.MaskedArray.T" title="numpy.ma.MaskedArray.T"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.T</span></code></a></p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="item-selection-and-manipulation">
<h2>Item selection and manipulation<a class="headerlink" href="#item-selection-and-manipulation" title="Permalink to this headline">¶</a></h2>
<p>For array methods that take an <code class="docutils literal notranslate"><span class="pre">axis</span></code> keyword, it defaults to None.
If axis is None, then the array is treated as a 1-D array.
Any other value for <code class="docutils literal notranslate"><span class="pre">axis</span></code> represents the dimension along which
the operation should proceed.</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.argmax.html#numpy.ma.MaskedArray.argmax" title="numpy.ma.MaskedArray.argmax"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.argmax</span></code></a>(self[, axis, fill_value, out])</p></td>
<td><p>Returns array of indices of the maximum values along the given axis.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.argmin.html#numpy.ma.MaskedArray.argmin" title="numpy.ma.MaskedArray.argmin"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.argmin</span></code></a>(self[, axis, fill_value, out])</p></td>
<td><p>Return array of indices to the minimum values along the given axis.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.argsort.html#numpy.ma.MaskedArray.argsort" title="numpy.ma.MaskedArray.argsort"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.argsort</span></code></a>(self[, axis, kind, …])</p></td>
<td><p>Return an ndarray of indices that sort the array along the specified axis.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.choose.html#numpy.ma.MaskedArray.choose" title="numpy.ma.MaskedArray.choose"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.choose</span></code></a>(choices[, out, mode])</p></td>
<td><p>Use an index array to construct a new array from a set of choices.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.compress.html#numpy.ma.MaskedArray.compress" title="numpy.ma.MaskedArray.compress"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.compress</span></code></a>(self, condition[, …])</p></td>
<td><p>Return <em class="xref py py-obj">a</em> where condition is <code class="docutils literal notranslate"><span class="pre">True</span></code>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.diagonal.html#numpy.ma.MaskedArray.diagonal" title="numpy.ma.MaskedArray.diagonal"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.diagonal</span></code></a>([offset, axis1, axis2])</p></td>
<td><p>Return specified diagonals.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.fill.html#numpy.ma.MaskedArray.fill" title="numpy.ma.MaskedArray.fill"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.fill</span></code></a>(value)</p></td>
<td><p>Fill the array with a scalar value.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.item.html#numpy.ma.MaskedArray.item" title="numpy.ma.MaskedArray.item"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.item</span></code></a>(*args)</p></td>
<td><p>Copy an element of an array to a standard Python scalar and return it.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.nonzero.html#numpy.ma.MaskedArray.nonzero" title="numpy.ma.MaskedArray.nonzero"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.nonzero</span></code></a>(self)</p></td>
<td><p>Return the indices of unmasked elements that are not zero.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.put.html#numpy.ma.MaskedArray.put" title="numpy.ma.MaskedArray.put"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.put</span></code></a>(self, indices, values[, mode])</p></td>
<td><p>Set storage-indexed locations to corresponding values.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.repeat.html#numpy.ma.MaskedArray.repeat" title="numpy.ma.MaskedArray.repeat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.repeat</span></code></a>(repeats[, axis])</p></td>
<td><p>Repeat elements of an array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.searchsorted.html#numpy.ma.MaskedArray.searchsorted" title="numpy.ma.MaskedArray.searchsorted"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.searchsorted</span></code></a>(v[, side, sorter])</p></td>
<td><p>Find indices where elements of v should be inserted in a to maintain order.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.sort.html#numpy.ma.MaskedArray.sort" title="numpy.ma.MaskedArray.sort"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.sort</span></code></a>(self[, axis, kind, order, …])</p></td>
<td><p>Sort the array, in-place</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.take.html#numpy.ma.MaskedArray.take" title="numpy.ma.MaskedArray.take"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.take</span></code></a>(self, indices[, axis, out, …])</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="pickling-and-copy">
<h2>Pickling and copy<a class="headerlink" href="#pickling-and-copy" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.copy.html#numpy.ma.MaskedArray.copy" title="numpy.ma.MaskedArray.copy"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.copy</span></code></a>([order])</p></td>
<td><p>Return a copy of the array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.dump.html#numpy.ma.MaskedArray.dump" title="numpy.ma.MaskedArray.dump"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.dump</span></code></a>(file)</p></td>
<td><p>Dump a pickle of the array to the specified file.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.dumps.html#numpy.ma.MaskedArray.dumps" title="numpy.ma.MaskedArray.dumps"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.dumps</span></code></a>()</p></td>
<td><p>Returns the pickle of the array as a string.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="calculations">
<h2>Calculations<a class="headerlink" href="#calculations" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.all.html#numpy.ma.MaskedArray.all" title="numpy.ma.MaskedArray.all"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.all</span></code></a>(self[, axis, out, keepdims])</p></td>
<td><p>Returns True if all elements evaluate to True.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.anom.html#numpy.ma.MaskedArray.anom" title="numpy.ma.MaskedArray.anom"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.anom</span></code></a>(self[, axis, dtype])</p></td>
<td><p>Compute the anomalies (deviations from the arithmetic mean) along the given axis.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.any.html#numpy.ma.MaskedArray.any" title="numpy.ma.MaskedArray.any"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.any</span></code></a>(self[, axis, out, keepdims])</p></td>
<td><p>Returns True if any of the elements of <em class="xref py py-obj">a</em> evaluate to True.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.clip.html#numpy.ma.MaskedArray.clip" title="numpy.ma.MaskedArray.clip"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.clip</span></code></a>([min, max, out])</p></td>
<td><p>Return an array whose values are limited to <code class="docutils literal notranslate"><span class="pre">[min,</span> <span class="pre">max]</span></code>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.conj.html#numpy.ma.MaskedArray.conj" title="numpy.ma.MaskedArray.conj"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.conj</span></code></a>()</p></td>
<td><p>Complex-conjugate all elements.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.conjugate.html#numpy.ma.MaskedArray.conjugate" title="numpy.ma.MaskedArray.conjugate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.conjugate</span></code></a>()</p></td>
<td><p>Return the complex conjugate, element-wise.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.cumprod.html#numpy.ma.MaskedArray.cumprod" title="numpy.ma.MaskedArray.cumprod"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.cumprod</span></code></a>(self[, axis, dtype, out])</p></td>
<td><p>Return the cumulative product of the array elements over the given axis.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.cumsum.html#numpy.ma.MaskedArray.cumsum" title="numpy.ma.MaskedArray.cumsum"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.cumsum</span></code></a>(self[, axis, dtype, out])</p></td>
<td><p>Return the cumulative sum of the array elements over the given axis.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.max.html#numpy.ma.MaskedArray.max" title="numpy.ma.MaskedArray.max"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.max</span></code></a>(self[, axis, out, …])</p></td>
<td><p>Return the maximum along a given axis.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.mean.html#numpy.ma.MaskedArray.mean" title="numpy.ma.MaskedArray.mean"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.mean</span></code></a>(self[, axis, dtype, out, …])</p></td>
<td><p>Returns the average of the array elements along given axis.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.min.html#numpy.ma.MaskedArray.min" title="numpy.ma.MaskedArray.min"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.min</span></code></a>(self[, axis, out, …])</p></td>
<td><p>Return the minimum along a given axis.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.prod.html#numpy.ma.MaskedArray.prod" title="numpy.ma.MaskedArray.prod"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.prod</span></code></a>(self[, axis, dtype, out, …])</p></td>
<td><p>Return the product of the array elements over the given axis.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.product.html#numpy.ma.MaskedArray.product" title="numpy.ma.MaskedArray.product"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.product</span></code></a>(self[, axis, dtype, …])</p></td>
<td><p>Return the product of the array elements over the given axis.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.ptp.html#numpy.ma.MaskedArray.ptp" title="numpy.ma.MaskedArray.ptp"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.ptp</span></code></a>(self[, axis, out, …])</p></td>
<td><p>Return (maximum - minimum) along the given dimension (i.e.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.round.html#numpy.ma.MaskedArray.round" title="numpy.ma.MaskedArray.round"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.round</span></code></a>(self[, decimals, out])</p></td>
<td><p>Return each element rounded to the given number of decimals.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.std.html#numpy.ma.MaskedArray.std" title="numpy.ma.MaskedArray.std"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.std</span></code></a>(self[, axis, dtype, out, …])</p></td>
<td><p>Returns the standard deviation of the array elements along given axis.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.sum.html#numpy.ma.MaskedArray.sum" title="numpy.ma.MaskedArray.sum"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.sum</span></code></a>(self[, axis, dtype, out, …])</p></td>
<td><p>Return the sum of the array elements over the given axis.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.trace.html#numpy.ma.MaskedArray.trace" title="numpy.ma.MaskedArray.trace"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.trace</span></code></a>([offset, axis1, axis2, …])</p></td>
<td><p>Return the sum along diagonals of the array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.var.html#numpy.ma.MaskedArray.var" title="numpy.ma.MaskedArray.var"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.var</span></code></a>(self[, axis, dtype, out, …])</p></td>
<td><p>Compute the variance along the specified axis.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="arithmetic-and-comparison-operations">
<h2>Arithmetic and comparison operations<a class="headerlink" href="#arithmetic-and-comparison-operations" title="Permalink to this headline">¶</a></h2>
<div class="section" id="comparison-operators">
<span id="index-0"></span><h3>Comparison operators:<a class="headerlink" href="#comparison-operators" title="Permalink to this headline">¶</a></h3>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__lt__.html#numpy.ma.MaskedArray.__lt__" title="numpy.ma.MaskedArray.__lt__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__lt__</span></code></a>(self, value, /)</p></td>
<td><p>Return self&lt;value.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__le__.html#numpy.ma.MaskedArray.__le__" title="numpy.ma.MaskedArray.__le__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__le__</span></code></a>(self, value, /)</p></td>
<td><p>Return self&lt;=value.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__gt__.html#numpy.ma.MaskedArray.__gt__" title="numpy.ma.MaskedArray.__gt__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__gt__</span></code></a>(self, value, /)</p></td>
<td><p>Return self&gt;value.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__ge__.html#numpy.ma.MaskedArray.__ge__" title="numpy.ma.MaskedArray.__ge__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__ge__</span></code></a>(self, value, /)</p></td>
<td><p>Return self&gt;=value.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__eq__.html#numpy.ma.MaskedArray.__eq__" title="numpy.ma.MaskedArray.__eq__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__eq__</span></code></a>(self, other)</p></td>
<td><p>Check whether other equals self elementwise.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__ne__.html#numpy.ma.MaskedArray.__ne__" title="numpy.ma.MaskedArray.__ne__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__ne__</span></code></a>(self, other)</p></td>
<td><p>Check whether other does not equal self elementwise.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="truth-value-of-an-array-bool">
<h3>Truth value of an array (<code class="xref py py-func docutils literal notranslate"><span class="pre">bool</span></code>):<a class="headerlink" href="#truth-value-of-an-array-bool" title="Permalink to this headline">¶</a></h3>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__bool__.html#numpy.ma.MaskedArray.__bool__" title="numpy.ma.MaskedArray.__bool__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__bool__</span></code></a>(self, /)</p></td>
<td><p>self != 0</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="arithmetic">
<h3>Arithmetic:<a class="headerlink" href="#arithmetic" title="Permalink to this headline">¶</a></h3>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__abs__.html#numpy.ma.MaskedArray.__abs__" title="numpy.ma.MaskedArray.__abs__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__abs__</span></code></a>(self)</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__add__.html#numpy.ma.MaskedArray.__add__" title="numpy.ma.MaskedArray.__add__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__add__</span></code></a>(self, other)</p></td>
<td><p>Add self to other, and return a new masked array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__radd__.html#numpy.ma.MaskedArray.__radd__" title="numpy.ma.MaskedArray.__radd__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__radd__</span></code></a>(self, other)</p></td>
<td><p>Add other to self, and return a new masked array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__sub__.html#numpy.ma.MaskedArray.__sub__" title="numpy.ma.MaskedArray.__sub__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__sub__</span></code></a>(self, other)</p></td>
<td><p>Subtract other from self, and return a new masked array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__rsub__.html#numpy.ma.MaskedArray.__rsub__" title="numpy.ma.MaskedArray.__rsub__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__rsub__</span></code></a>(self, other)</p></td>
<td><p>Subtract self from other, and return a new masked array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__mul__.html#numpy.ma.MaskedArray.__mul__" title="numpy.ma.MaskedArray.__mul__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__mul__</span></code></a>(self, other)</p></td>
<td><p>Multiply self by other, and return a new masked array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__rmul__.html#numpy.ma.MaskedArray.__rmul__" title="numpy.ma.MaskedArray.__rmul__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__rmul__</span></code></a>(self, other)</p></td>
<td><p>Multiply other by self, and return a new masked array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__div__.html#numpy.ma.MaskedArray.__div__" title="numpy.ma.MaskedArray.__div__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__div__</span></code></a>(self, other)</p></td>
<td><p>Divide other into self, and return a new masked array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__truediv__.html#numpy.ma.MaskedArray.__truediv__" title="numpy.ma.MaskedArray.__truediv__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__truediv__</span></code></a>(self, other)</p></td>
<td><p>Divide other into self, and return a new masked array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__rtruediv__.html#numpy.ma.MaskedArray.__rtruediv__" title="numpy.ma.MaskedArray.__rtruediv__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__rtruediv__</span></code></a>(self, other)</p></td>
<td><p>Divide self into other, and return a new masked array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__floordiv__.html#numpy.ma.MaskedArray.__floordiv__" title="numpy.ma.MaskedArray.__floordiv__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__floordiv__</span></code></a>(self, other)</p></td>
<td><p>Divide other into self, and return a new masked array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__rfloordiv__.html#numpy.ma.MaskedArray.__rfloordiv__" title="numpy.ma.MaskedArray.__rfloordiv__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__rfloordiv__</span></code></a>(self, other)</p></td>
<td><p>Divide self into other, and return a new masked array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__mod__.html#numpy.ma.MaskedArray.__mod__" title="numpy.ma.MaskedArray.__mod__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__mod__</span></code></a>(self, value, /)</p></td>
<td><p>Return self%value.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__rmod__.html#numpy.ma.MaskedArray.__rmod__" title="numpy.ma.MaskedArray.__rmod__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__rmod__</span></code></a>(self, value, /)</p></td>
<td><p>Return value%self.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__divmod__.html#numpy.ma.MaskedArray.__divmod__" title="numpy.ma.MaskedArray.__divmod__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__divmod__</span></code></a>(self, value, /)</p></td>
<td><p>Return divmod(self, value).</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__rdivmod__.html#numpy.ma.MaskedArray.__rdivmod__" title="numpy.ma.MaskedArray.__rdivmod__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__rdivmod__</span></code></a>(self, value, /)</p></td>
<td><p>Return divmod(value, self).</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__pow__.html#numpy.ma.MaskedArray.__pow__" title="numpy.ma.MaskedArray.__pow__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__pow__</span></code></a>(self, other)</p></td>
<td><p>Raise self to the power other, masking the potential NaNs/Infs</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__rpow__.html#numpy.ma.MaskedArray.__rpow__" title="numpy.ma.MaskedArray.__rpow__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__rpow__</span></code></a>(self, other)</p></td>
<td><p>Raise other to the power self, masking the potential NaNs/Infs</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__lshift__.html#numpy.ma.MaskedArray.__lshift__" title="numpy.ma.MaskedArray.__lshift__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__lshift__</span></code></a>(self, value, /)</p></td>
<td><p>Return self&lt;&lt;value.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__rlshift__.html#numpy.ma.MaskedArray.__rlshift__" title="numpy.ma.MaskedArray.__rlshift__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__rlshift__</span></code></a>(self, value, /)</p></td>
<td><p>Return value&lt;&lt;self.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__rshift__.html#numpy.ma.MaskedArray.__rshift__" title="numpy.ma.MaskedArray.__rshift__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__rshift__</span></code></a>(self, value, /)</p></td>
<td><p>Return self&gt;&gt;value.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__rrshift__.html#numpy.ma.MaskedArray.__rrshift__" title="numpy.ma.MaskedArray.__rrshift__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__rrshift__</span></code></a>(self, value, /)</p></td>
<td><p>Return value&gt;&gt;self.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__and__.html#numpy.ma.MaskedArray.__and__" title="numpy.ma.MaskedArray.__and__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__and__</span></code></a>(self, value, /)</p></td>
<td><p>Return self&amp;value.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__rand__.html#numpy.ma.MaskedArray.__rand__" title="numpy.ma.MaskedArray.__rand__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__rand__</span></code></a>(self, value, /)</p></td>
<td><p>Return value&amp;self.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__or__.html#numpy.ma.MaskedArray.__or__" title="numpy.ma.MaskedArray.__or__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__or__</span></code></a>(self, value, /)</p></td>
<td><p>Return self|value.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__ror__.html#numpy.ma.MaskedArray.__ror__" title="numpy.ma.MaskedArray.__ror__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__ror__</span></code></a>(self, value, /)</p></td>
<td><p>Return value|self.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__xor__.html#numpy.ma.MaskedArray.__xor__" title="numpy.ma.MaskedArray.__xor__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__xor__</span></code></a>(self, value, /)</p></td>
<td><p>Return self^value.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__rxor__.html#numpy.ma.MaskedArray.__rxor__" title="numpy.ma.MaskedArray.__rxor__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__rxor__</span></code></a>(self, value, /)</p></td>
<td><p>Return value^self.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="arithmetic-in-place">
<h3>Arithmetic, in-place:<a class="headerlink" href="#arithmetic-in-place" title="Permalink to this headline">¶</a></h3>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__iadd__.html#numpy.ma.MaskedArray.__iadd__" title="numpy.ma.MaskedArray.__iadd__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__iadd__</span></code></a>(self, other)</p></td>
<td><p>Add other to self in-place.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__isub__.html#numpy.ma.MaskedArray.__isub__" title="numpy.ma.MaskedArray.__isub__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__isub__</span></code></a>(self, other)</p></td>
<td><p>Subtract other from self in-place.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__imul__.html#numpy.ma.MaskedArray.__imul__" title="numpy.ma.MaskedArray.__imul__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__imul__</span></code></a>(self, other)</p></td>
<td><p>Multiply self by other in-place.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__idiv__.html#numpy.ma.MaskedArray.__idiv__" title="numpy.ma.MaskedArray.__idiv__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__idiv__</span></code></a>(self, other)</p></td>
<td><p>Divide self by other in-place.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__itruediv__.html#numpy.ma.MaskedArray.__itruediv__" title="numpy.ma.MaskedArray.__itruediv__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__itruediv__</span></code></a>(self, other)</p></td>
<td><p>True divide self by other in-place.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__ifloordiv__.html#numpy.ma.MaskedArray.__ifloordiv__" title="numpy.ma.MaskedArray.__ifloordiv__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__ifloordiv__</span></code></a>(self, other)</p></td>
<td><p>Floor divide self by other in-place.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__imod__.html#numpy.ma.MaskedArray.__imod__" title="numpy.ma.MaskedArray.__imod__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__imod__</span></code></a>(self, value, /)</p></td>
<td><p>Return self%=value.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__ipow__.html#numpy.ma.MaskedArray.__ipow__" title="numpy.ma.MaskedArray.__ipow__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__ipow__</span></code></a>(self, other)</p></td>
<td><p>Raise self to the power other, in place.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__ilshift__.html#numpy.ma.MaskedArray.__ilshift__" title="numpy.ma.MaskedArray.__ilshift__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__ilshift__</span></code></a>(self, value, /)</p></td>
<td><p>Return self&lt;&lt;=value.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__irshift__.html#numpy.ma.MaskedArray.__irshift__" title="numpy.ma.MaskedArray.__irshift__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__irshift__</span></code></a>(self, value, /)</p></td>
<td><p>Return self&gt;&gt;=value.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__iand__.html#numpy.ma.MaskedArray.__iand__" title="numpy.ma.MaskedArray.__iand__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__iand__</span></code></a>(self, value, /)</p></td>
<td><p>Return self&amp;=value.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__ior__.html#numpy.ma.MaskedArray.__ior__" title="numpy.ma.MaskedArray.__ior__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__ior__</span></code></a>(self, value, /)</p></td>
<td><p>Return self|=value.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__ixor__.html#numpy.ma.MaskedArray.__ixor__" title="numpy.ma.MaskedArray.__ixor__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__ixor__</span></code></a>(self, value, /)</p></td>
<td><p>Return self^=value.</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="representation">
<h2>Representation<a class="headerlink" href="#representation" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__repr__.html#numpy.ma.MaskedArray.__repr__" title="numpy.ma.MaskedArray.__repr__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__repr__</span></code></a>(self)</p></td>
<td><p>Literal string representation.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__str__.html#numpy.ma.MaskedArray.__str__" title="numpy.ma.MaskedArray.__str__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__str__</span></code></a>(self)</p></td>
<td><p>Return str(self).</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.ids.html#numpy.ma.MaskedArray.ids" title="numpy.ma.MaskedArray.ids"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.ids</span></code></a>(self)</p></td>
<td><p>Return the addresses of the data and mask areas.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.iscontiguous.html#numpy.ma.MaskedArray.iscontiguous" title="numpy.ma.MaskedArray.iscontiguous"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.iscontiguous</span></code></a>(self)</p></td>
<td><p>Return a boolean indicating whether the data is contiguous.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="special-methods">
<h2>Special methods<a class="headerlink" href="#special-methods" title="Permalink to this headline">¶</a></h2>
<p>For standard library functions:</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__copy__.html#numpy.ma.MaskedArray.__copy__" title="numpy.ma.MaskedArray.__copy__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__copy__</span></code></a>()</p></td>
<td><p>Used if <a class="reference external" href="https://docs.python.org/dev/library/copy.html#copy.copy" title="(in Python v3.9)"><code class="xref py py-func docutils literal notranslate"><span class="pre">copy.copy</span></code></a> is called on an array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__deepcopy__.html#numpy.ma.MaskedArray.__deepcopy__" title="numpy.ma.MaskedArray.__deepcopy__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__deepcopy__</span></code></a>(self[, memo])</p></td>
<td><p>Used if <a class="reference external" href="https://docs.python.org/dev/library/copy.html#copy.deepcopy" title="(in Python v3.9)"><code class="xref py py-func docutils literal notranslate"><span class="pre">copy.deepcopy</span></code></a> is called on an array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__getstate__.html#numpy.ma.MaskedArray.__getstate__" title="numpy.ma.MaskedArray.__getstate__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__getstate__</span></code></a>(self)</p></td>
<td><p>Return the internal state of the masked array, for pickling purposes.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__reduce__.html#numpy.ma.MaskedArray.__reduce__" title="numpy.ma.MaskedArray.__reduce__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__reduce__</span></code></a>(self)</p></td>
<td><p>Return a 3-tuple for pickling a MaskedArray.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__setstate__.html#numpy.ma.MaskedArray.__setstate__" title="numpy.ma.MaskedArray.__setstate__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__setstate__</span></code></a>(self, state)</p></td>
<td><p>Restore the internal state of the masked array, for pickling purposes.</p></td>
</tr>
</tbody>
</table>
<p>Basic customization:</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__new__.html#numpy.ma.MaskedArray.__new__" title="numpy.ma.MaskedArray.__new__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__new__</span></code></a>(cls[, data, mask, …])</p></td>
<td><p>Create a new masked array from scratch.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__array__.html#numpy.ma.MaskedArray.__array__" title="numpy.ma.MaskedArray.__array__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__array__</span></code></a>()</p></td>
<td><p>Returns either a new reference to self if dtype is not given or a new array of provided data type if dtype is different from the current dtype of the array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__array_wrap__.html#numpy.ma.MaskedArray.__array_wrap__" title="numpy.ma.MaskedArray.__array_wrap__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__array_wrap__</span></code></a>(self, obj[, context])</p></td>
<td><p>Special hook for ufuncs.</p></td>
</tr>
</tbody>
</table>
<p>Container customization: (see <a class="reference internal" href="arrays.indexing.html#arrays-indexing"><span class="std std-ref">Indexing</span></a>)</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__len__.html#numpy.ma.MaskedArray.__len__" title="numpy.ma.MaskedArray.__len__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__len__</span></code></a>(self, /)</p></td>
<td><p>Return len(self).</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__getitem__.html#numpy.ma.MaskedArray.__getitem__" title="numpy.ma.MaskedArray.__getitem__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__getitem__</span></code></a>(self, indx)</p></td>
<td><p>x.__getitem__(y) &lt;==&gt; x[y]</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__setitem__.html#numpy.ma.MaskedArray.__setitem__" title="numpy.ma.MaskedArray.__setitem__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__setitem__</span></code></a>(self, indx, value)</p></td>
<td><p>x.__setitem__(i, y) &lt;==&gt; x[i]=y</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__delitem__.html#numpy.ma.MaskedArray.__delitem__" title="numpy.ma.MaskedArray.__delitem__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__delitem__</span></code></a>(self, key, /)</p></td>
<td><p>Delete self[key].</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__contains__.html#numpy.ma.MaskedArray.__contains__" title="numpy.ma.MaskedArray.__contains__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__contains__</span></code></a>(self, key, /)</p></td>
<td><p>Return key in self.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="specific-methods">
<h2>Specific methods<a class="headerlink" href="#specific-methods" title="Permalink to this headline">¶</a></h2>
<div class="section" id="handling-the-mask">
<h3>Handling the mask<a class="headerlink" href="#handling-the-mask" title="Permalink to this headline">¶</a></h3>
<p>The following methods can be used to access information about the mask or to
manipulate the mask.</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.__setmask__.html#numpy.ma.MaskedArray.__setmask__" title="numpy.ma.MaskedArray.__setmask__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.__setmask__</span></code></a>(self, mask[, copy])</p></td>
<td><p>Set the mask.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.harden_mask.html#numpy.ma.MaskedArray.harden_mask" title="numpy.ma.MaskedArray.harden_mask"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.harden_mask</span></code></a>(self)</p></td>
<td><p>Force the mask to hard.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.soften_mask.html#numpy.ma.MaskedArray.soften_mask" title="numpy.ma.MaskedArray.soften_mask"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.soften_mask</span></code></a>(self)</p></td>
<td><p>Force the mask to soft.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.unshare_mask.html#numpy.ma.MaskedArray.unshare_mask" title="numpy.ma.MaskedArray.unshare_mask"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.unshare_mask</span></code></a>(self)</p></td>
<td><p>Copy the mask and set the sharedmask flag to False.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.shrink_mask.html#numpy.ma.MaskedArray.shrink_mask" title="numpy.ma.MaskedArray.shrink_mask"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.shrink_mask</span></code></a>(self)</p></td>
<td><p>Reduce a mask to nomask when possible.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="handling-the-fill-value">
<h3>Handling the <em class="xref py py-obj">fill_value</em><a class="headerlink" href="#handling-the-fill-value" title="Permalink to this headline">¶</a></h3>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.get_fill_value.html#numpy.ma.MaskedArray.get_fill_value" title="numpy.ma.MaskedArray.get_fill_value"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.get_fill_value</span></code></a>(self)</p></td>
<td><p>The filling value of the masked array is a scalar.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.set_fill_value.html#numpy.ma.MaskedArray.set_fill_value" title="numpy.ma.MaskedArray.set_fill_value"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.set_fill_value</span></code></a>(self[, value])</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="counting-the-missing-elements">
<h3>Counting the missing elements<a class="headerlink" href="#counting-the-missing-elements" title="Permalink to this headline">¶</a></h3>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ma.MaskedArray.count.html#numpy.ma.MaskedArray.count" title="numpy.ma.MaskedArray.count"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaskedArray.count</span></code></a>(self[, axis, keepdims])</p></td>
<td><p>Count the non-masked elements of the array along the given axis.</p></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>


          </div>
        </div>
          </div>
        </div>
      </div>
    </div>

    <div class="container container-navbar-bottom">
      <div class="spc-navbar">
        
      </div>
    </div>
    <div class="container">
    <div class="footer">
    <div class="row-fluid">
    <ul class="inline pull-left">
      <li>
        &copy; Copyright 2008-2019, The SciPy community.
      </li>
      <li>
      Last updated on Feb 20, 2020.
      </li>
      <li>
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 2.4.2.
      </li>
    </ul>
    </div>
    </div>
    </div>
  </body>
</html>